Latest update: May 2018
In this tutorial, we will reload FlashAir and explain how to make your OS recognize a file modified by Lua scripts/upload.cgi
FlashAir can create and delete files using Lua scripts and upload.cgi.
When this happens, if the OS of the SD memory card host caches the contents of the SD memory card, the OS will not recognize the change. This means if you change out the SD card, a FAT inconsistency may occur.
Once you remove from the SD memory card host device and reinsert it, you can reload the contents of the SD memory card to the SD memory card host device. However, you may want to re-recognize directly without touching FlashAir, such as when operating FlashAir from a remote place.
In this tutorial, we will explain to how to physically remerge FlashAir, remount it, and reload it to the OS. When reading and writing files on FlashAir from the OS after creating or deleting files with Lua script or upload.cgi, it is a good idea to reread the contents of the card to OS by the method described in this tutorial.
Reconnect the removable disk using
devcon.exe
tool.
cd "C:\Program Files (x86)\Windows Kits\10\Tools\x64"
devcon.exe restart <Hardware ID>
Use the command mount , umount . Also install the library to load the SD card.
sudo yum install exfat-fuse exfat-utils
sudo apt-get install exfat-fuse exfat-utils
sudo fdisk -l
$ sudo fdisk -l (Omission) Device Boot Start End Sectors Size Id Type /dev/mmcblkOp1 8192 131971 122880 60M c w95 FAT32 (LBA) /dev/mmcblkOp2 131072 15564799 15433728 7.4G 83 Linux (Omission) Device Boot Start End Sectors Size Id Type /dev/sdb1 8192 30228479 30220288 14.4G c w95 FAT32 (LBA)
/dev/sdb1
.df
command and check whether there is the device name examined above./dev/sdb1
is mounted on
/mnt/flashair
.sudo mkdir /mnt/flashair
mouont /dev/sdb1 /mnt/flashair
umount /dev/sdb1
mount /dev/sdb1 /mnt/flashair
Use the command diskutil to reconnect the device.
diskutil list
$ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *251.0 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_APFS Container disk1 250.8 GB disk0s2 /dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +250.8 GB disk1 Physical Store disk0s2 1: APFS Volume Macintosh HD 160.0 GB disk1s1 2: APFS Volume Preboot 21.3 MB disk1s2 3: APFS Volume Recovery 517.8 MB disk1s3 4: APFS Volume VM 3.2 GB disk1s4 /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *15.5 GB disk2 1: Windows_FAT_32 NO NAME 15.5 GB disk2s1
disk2s1
.diskutil umount <Device name>
diskutil mount <Device name>